import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { CodeComponent } from './code.component';
import { IssueDetailComponent } from './issue-detail/issue-detail.component';
import { IssuesComponent } from './issues/issues.component';
import { RepositoryComponent } from './repository/repository.component';
import { SearchComponent } from './search/search.component';

const routes: Routes = [{
  path: '', component: CodeComponent, children: [
    { path: 'search', component: SearchComponent },
    { path: 'issues', component: IssuesComponent },
    { path: 'repository', component: RepositoryComponent },
    { path: 'issueDetail', component: IssueDetailComponent },
  ]
}];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class CodeRoutingModule { }
